<%@ page import="nonpersisted.OzenkiRequest" %>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
  <meta name="layout" content="main"/>
  <g:set var="entityName" value="${message(code: 'ozenkiRequest.label', default: 'OzenkiRequest')}"/>
  <title><g:message code="default.create.label" args="[entityName]"/></title>
</head>

<body>
<div class="nav">
  <span class="menuButton"><a class="home" href="${createLink(uri: '/')}"><g:message code="default.home.label"/></a>
  </span>
  <span class="menuButton"><g:link class="list" action="list"><g:message code="default.list.label"
                                                                         args="[entityName]"/></g:link></span>
</div>

<div class="body">
  <h1><g:message code="default.create.label" args="[entityName]"/></h1>
  <g:if test="${flash.message}">
    <div class="message">${flash.message}</div>
  </g:if>
  <g:hasErrors bean="${ozenkiRequestInstance}">
    <div class="errors">
      <g:renderErrors bean="${ozenkiRequestInstance}" as="list"/>
    </div>
  </g:hasErrors>
  <g:form action="save">
    <div class="dialog">
      <table>
        <tbody>

        <tr class="prop">
          <td valign="top" class="name">
            <label for="amount"><g:message code="ozenkiRequest.amount.label" default="Amount"/></label>
          </td>
          <td valign="top" class="value ${hasErrors(bean: ozenkiRequestInstance, field: 'amount', 'errors')}">
            <g:textField name="amount" value="${fieldValue(bean: ozenkiRequestInstance, field: 'amount')}"/>
          </td>
        </tr>

        <tr class="prop">
          <td valign="top" class="name">
            <label for="code"><g:message code="ozenkiRequest.code.label" default="Code"/></label>
          </td>
          <td valign="top" class="value ${hasErrors(bean: ozenkiRequestInstance, field: 'code', 'errors')}">
            <g:select name="code" from="${enummpay.MessageType?.values()}"
                      keys="${enummpay.MessageType?.values()*.name()}" value="${ozenkiRequestInstance?.code?.name()}"/>
          </td>
        </tr>

        <tr class="prop">
          <td valign="top" class="name">
            <label for="isValidRequest"><g:message code="ozenkiRequest.isValidRequest.label"
                                                   default="Is Valid Request"/></label>
          </td>
          <td valign="top" class="value ${hasErrors(bean: ozenkiRequestInstance, field: 'isValidRequest', 'errors')}">
            <g:checkBox name="isValidRequest" value="${ozenkiRequestInstance?.isValidRequest}"/>
          </td>
        </tr>

        <tr class="prop">
          <td valign="top" class="name">
            <label for="message"><g:message code="ozenkiRequest.message.label" default="Message"/></label>
          </td>
          <td valign="top" class="value ${hasErrors(bean: ozenkiRequestInstance, field: 'message', 'errors')}">
            <g:textField name="message" value="${ozenkiRequestInstance?.message}"/>
          </td>
        </tr>

        <tr class="prop">
          <td valign="top" class="name">
            <label for="requestDetail"><g:message code="ozenkiRequest.requestDetail.label"
                                                  default="Request Detail"/></label>
          </td>
          <td valign="top" class="value ${hasErrors(bean: ozenkiRequestInstance, field: 'requestDetail', 'errors')}">
            <g:textField name="requestDetail" value="${ozenkiRequestInstance?.requestDetail}"/>
          </td>
        </tr>

        <tr class="prop">
          <td valign="top" class="name">
            <label for="transactionId"><g:message code="ozenkiRequest.transactionId.label"
                                                  default="Transaction Id"/></label>
          </td>
          <td valign="top" class="value ${hasErrors(bean: ozenkiRequestInstance, field: 'transactionId', 'errors')}">
            <g:textField name="transactionId"
                         value="${fieldValue(bean: ozenkiRequestInstance, field: 'transactionId')}"/>
          </td>
        </tr>

        </tbody>
      </table>
    </div>

    <div class="buttons">
      <span class="button"><g:submitButton name="create" class="save"
                                           value="${message(code: 'default.button.create.label', default: 'Create')}"/></span>
    </div>
  </g:form>
</div>
</body>
</html>
